package com.zyc.chapter14.service;

import com.zyc.chapter14.entity.User;
import com.zyc.chapter14.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;


    @Override
    public User login(String number, String password) {
        return userMapper.selectUserByUsernameAndPassword(number,password);

    }

    @Override
    public List<User> findAll(User user) {
        return userMapper.selectAll();
    }
}
